package com.neusoft.tyut.factory;

import com.neusoft.tyut.obj.Water;

public class FactoryManager {
    private  static  final  BeerFactory beerFactory = new BeerFactory();
    private  static  final  ColoFacotry coloFacotry = new ColoFacotry();

    public static Water produce(String type)
    {
        Factory factory = null;
        if(type.equals("beer")){
            factory =  beerFactory;
        }else {
            factory = coloFacotry;
        }
        return  factory.produceWater();
    }
}
